{layout name="layout" /}

<div class="Hui-article">
    <div class="pd-20" style="min-width: 1000px; max-width: 80%;">
            {include file="common/search" /}
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <a href="javascript:;" onclick="del_all()" class="btn btn-danger radius">
                    <i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
                <a href="{:url('add')}" class="btn btn-primary radius">
                    <i class="Hui-iconfont">&#xe600;</i>添加文章</a>
            </span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort">
                <thead>
                    <tr class="text-c">
                        <th width="20px">
                            <input type="checkbox" value="" name="allcheck">
                        </th>
                        <th width="30px">ID</th>
                        <th width="160px">列表缩略图</th>
                        <th width="25%">标题</th>
                        <th width="160px" colspan="2">状态</th>
                        <th width="60px">排序</th>
                        <th width="60px">点击量</th>
                        <th width="130px">发布日期</th>
                        <th style="min-width: 80px;">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach $data as $val}
                    <tr class="text-c va-m">
                        <td>
                            <input type="checkbox" value="{$val.id}" name="checkbox[]">
                        </td>
                        <td>{$val.id}</td>
                        <td>
                            <img src="{$val.thumb}" style=" width: 150px;">
                        </td>
                        <td class="text-l">
                            <a href="/news/{$val.id}" style="text-decoration:none" title="浏览" target="_blank">{$val.title}</a>
                        </td>
                        <td>{eq name="val.top" value="1"}
                            <a href="javascript:void(0);" title="取消置顶" onClick="top_home('down',this,'top','{$val.id}')" style="text-decoration:none">
                                <span class="label label-success radius">置顶</span>
                            </a>
                            {else/}
                            <a href="javascript:void(0);" title="推荐置顶" onClick="top_home('up',this,'top','{$val.id}')" style="text-decoration:none">
                                <span class="label label-default radius">置顶</span>
                            </a>
                            {/eq}
                        </td>
                        <td>{eq name="val.status" value="1"}
                            <a href="javascript:void(0);" title="下线" onClick="duty('down',this,'{$val.id}')" style="text-decoration:none">
                                <span class="label label-success radius">正常</span>
                            </a>
                            {else/}
                            <a href="javascript:void(0);" title="上线" onClick="duty('up',this,'{$val.id}')" style="text-decoration:none">
                                <span class="label label-default radius">下线</span>
                            </a>{/eq}
                        </td>
                        <td>{$val.sort}</td>
                        <td>{$val.clicks}</td>
                        <td class="text-l">{$val.mtime|date="Y-m-d H:i:s",###}</td>
                        <td class="td-manage">
                            <a href="edit.html?id={$val.id}" title="编辑" style="text-decoration:none" class="ml-10">
                                <i class="Hui-iconfont">&#xe6df;</i>
                            </a>
                            <a href="javascript:;" title="删除" style="text-decoration:none" class="ml-10" onClick="del(this,'{$val.id}')">
                                <i class="Hui-iconfont">&#xe6e2;</i>
                            </a>
                        </td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20 ">
            <span class="l">共
                <strong>{$counts}</strong> 篇, {$pages} 页 </span>

            <span class="r">
                {$data->render()}
            </span>
        </div>
    </div>
</div>
<!-- 请在下方写此页面业务相关的脚本 -->
<script type="text/javascript">
</script>
<!--/请在上方写此页面业务相关的脚本-->